home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…stman Always Clicks Twice / ADC Developer CD (1993-01) (''The Postman Always Clicks Twice'')_iso / Dev.CD 199301.iso / Development Platforms / Apple II / HyperCardIIGS / Developer Tools / MPW.Interfaces / CIIGSIncludes / HyperXCMD.h
Encoding:
C/C++ Source or Header  |  1991-08-23  |  7.3 KB  |  144 lines  |  [TEXT/MPS ]

  1. /*********************************************************
  2.  
  3.   File: HyperXCMD.h
  4.  
  5.   Definition file for HyperCard XCMDs and XFCNs in C
  6.   For use with HyperCard IIGS Version 1.1
  7.  
  8.   Copyright © Apple Computer, Inc. 1990-91
  9.   All Rights Reserved
  10.  
  11. *********************************************************/
  12.  
  13. #ifndef __TYPES__
  14. #include <TYPES.h>
  15. #endif
  16.  
  17. #ifndef __HYPERXCMD__
  18. #define __HYPERXCMD__
  19.  
  20. #define _CallBackVector     0x00E10220L
  21.  
  22. /* XCMDBlock constants for event.what... */
  23. #define    xOpenEvt              1000         /* the first event after you are created     */
  24. #define    xCloseEvt             1001         /* your window is being forced close         */
  25. #define    xHidePalettesEvt    1004        /* someone called HideHCPalettes             */
  26. #define    xShowPalettesEvt    1005        /* someone called ShowHCPalettes             */
  27. #define    xCursorWithin        1300        /* cursor is within the window                 */
  28.  
  29. /* XWindow styles */
  30. #define    xWindoidStyle        0
  31. #define    xRectStyle            1
  32. #define    xShadowStyle        2
  33. #define    xDialogStyle        3
  34.  
  35. typedef String(19) Str19, *String19Ptr, **String19Handle;
  36. typedef String(31) Str31, *String31Ptr, **String31Handle;
  37.  
  38. struct XCMDBlock    {
  39.     int        paramCount;
  40.     Handle    params[16];
  41.     Handle    returnValue;
  42.     Boolean    passFlag;
  43.     Word    userID;
  44.     Word    returnStat;        /* 0 if normal, 1 if error    */
  45. } ;
  46. typedef struct XCMDBlock XCMDBlock, *XCMDPtr;
  47.  
  48. struct XWEventInfo {
  49.     WindowPtr        eventWindow;
  50.     EventRecord        event;
  51.     long            eventParams[9];
  52.     Handle            eventResult;
  53.   END;
  54. };
  55. typedef struct XWEventInfo XWEventInfo, *XWEventInfoPtr; 
  56.  
  57. /****  HyperTalk Utilities  ****/
  58. extern pascal Handle        EvalExpr( /* Str255 expr */ ) inline(0x0002,_CallBackVector);
  59. extern pascal void            SendCardMessage( /* Str255 msg */ ) inline(0x0001,_CallBackVector);
  60. extern pascal void            SendHCMessage( /* Str255 msg */ ) inline(0x0005,_CallBackVector);
  61.  
  62.  
  63. /****  Memory Utilities  ****/
  64. extern pascal Handle        GetGlobal( /* Str255 *globName */ ) inline(0x0012,_CallBackVector);
  65. extern pascal void            SetGlobal( /* Str255 globName,Handle globValue */ ) inline(0x0013,_CallBackVector);
  66. extern pascal void            ZeroBytes( /* Ptr dstPtr,long longCount */ ) inline(0x0006,_CallBackVector);
  67.  
  68.  
  69. /****  String Utilities  ****/
  70. extern pascal Boolean        GSStringEqual( /* GSString255Hndl src1,GSString255Hndl src2 */ ) inline(0x0022,_CallBackVector);
  71. extern pascal void            ScanToReturn( /* Ptr *scanPtr */ ) inline(0x001C,_CallBackVector);
  72. extern pascal void            ScanToZero( /* Ptr *scanPtr */ ) inline(0x001D,_CallBackVector);
  73. extern pascal Boolean        StringEqual( /* Str255 str1,Str255 str2 */ ) inline(0x001A,_CallBackVector);
  74. extern pascal Longint        StringLength( /* Ptr strPtr */ ) inline(0x0003,_CallBackVector);
  75. extern pascal Ptr            StringMatch( /* Str255 stringPattern,Ptr target */ ) inline(0x0004,_CallBackVector);
  76.  
  77.  
  78. /****  String Conversions  ****/
  79. extern pascal Str31            BoolToStr( /* Boolean bool */ ) inline(0x0010,_CallBackVector);
  80. extern pascal GSString255Hndl    CopyGSString( /* GSString255Hndl src */ ) inline(0x0020,_CallBackVector);
  81. extern pascal Str31            ExtToStr( /* Extended extendedNumber */ ) inline(0x0011,_CallBackVector);
  82. extern pascal GSString255Hndl  GSConcat( /* GSString255Hndl src1,GSString255Hndl src2 */ ) inline(0x0021,_CallBackVector);
  83. extern pascal Str255        GSToPString( /* GSString255Hndl src */ ) inline(0x001E,_CallBackVector);
  84. extern pascal Handle        GSToZero( /* GSString255Hndl src */ ) inline(0x0023,_CallBackVector);
  85. extern pascal Str31            LongToStr( /* Longint posNum */ ) inline(0x000D,_CallBackVector);
  86. extern pascal Str19            NumToHex( /* Longint longNumber,word nDigits */ ) inline(0x000F,_CallBackVector);
  87. extern pascal Str31            NumToStr( /* Longint longNumber */ ) inline(0x000E,_CallBackVector);
  88. extern pascal void             PointToStr( /* Point pt, Str255 str */ ) inline(0x002D,_CallBackVector);                        
  89. extern pascal Handle        PasToZero( /* Str255 str */ ) inline(0x0007,_CallBackVector);
  90. extern pascal GSString255Hndl  PToGSString( /* Str255 src */ ) inline(0x001F,_CallBackVector);
  91. extern pascal void             RectToStr( /* Rect *rct, Str255 str */ ) inline(0x002E,_CallBackVector);                        
  92. extern pascal void            ReturnToPas( /* Ptr zeroStr,Str255 *pasStr */ ) inline(0x001B,_CallBackVector);
  93. extern pascal Boolean        StrToBool( /* Str31 str */ ) inline(0x000B,_CallBackVector);
  94. extern pascal extended        StrToExt( /* Str31 str */ ) inline(0x000C,_CallBackVector);
  95. extern pascal Longint        StrToLong( /* Str31 str */ ) inline(0x0009,_CallBackVector);
  96. extern pascal Longint        StrToNum( /* Str31 str */ ) inline(0x000A,_CallBackVector);
  97. extern pascal void             StrToPoint( /* Str255 str, Point pt */ ) inline(0x002F,_CallBackVector);                        
  98. extern pascal void             StrToRect( /* Str255 str, Rect *rct */ ) inline(0x0030,_CallBackVector);                        
  99. extern pascal GSString255Hndl  ZeroToGS( /* Handle src */ ) inline(0x0024,_CallBackVector);
  100. extern pascal void            ZeroToPas( /* Ptr zeroStr,Str255 *pasStr */ ) inline(0x0008,_CallBackVector);
  101.  
  102.  
  103. /****  Field Utilities  ****/
  104. extern pascal Handle        GetFieldByID( /* Boolean cardFieldFlag,word fieldID */ ) inline(0x0016,_CallBackVector);
  105. extern pascal Handle        GetFieldByName( /* Boolean cardFieldFlag,Str255 fieldName */ ) inline(0x0014,_CallBackVector);
  106. extern pascal Handle        GetFieldByNum( /* Boolean cardFieldFlag,word fieldNum */ ) inline(0x0015,_CallBackVector);
  107. extern pascal void            SetFieldByID( /* Boolean cardFieldFlag,word fieldID,Handle fieldVal */ ) inline(0x0019,_CallBackVector);
  108. extern pascal void            SetFieldByName( /* Boolean cardFieldFlag,Str255 fieldNName,Handle fieldVal */ ) inline(0x0017,_CallBackVector);
  109. extern pascal void            SetFieldByNum( /* Boolean cardFieldFlag,word fieldNum,Handle fieldVal */ ) inline(0x0018,_CallBackVector);
  110.  
  111.  
  112. /****  Graphic Utilities  ****/
  113. extern pascal void            ChangedMaskAndData( /* word whatChanged */ ) inline(0x002C,_CallBackVector);
  114. extern pascal void            GetMaskAndData( /* mask *LocInfo, data *LocInfo */ ) inline(0x002B,_CallBackVector);
  115.  
  116.  
  117. /****  Miscellaneous Utilities  ****/
  118. extern pascal void            BeginXSound( ) inline(0x0029,_CallBackVector);
  119. extern pascal void            EndXSound( ) inline(0x002A,_CallBackVector);
  120.  
  121.  
  122. /****  Resource Names Utilities  ****/
  123. extern pascal Boolean        FindNamedResource( /* word resourceType,Str255 resourceName,word *theFile,long *resourceID */ ) inline(0x0026,_CallBackVector);
  124. extern pascal Str255        GetResourceName( /* word resourceType,long resourceID */ ) inline(0x0028,_CallBackVector);
  125. extern pascal Handle        LoadNamedResource( /* word resourceType,Str255 resourceName */ ) inline(0x0025,_CallBackVector);
  126. extern pascal void            SetResourceName( /* word resourceType,long resourceID,Str255 resourceName */ ) inline(0x0027,_CallBackVector);
  127.  
  128.  
  129. /****  Creating and Disposing XWindoids  ****/
  130. extern pascal WindowPtr        NewXWindow( /* Rect boundsRect, Str31 windName, Boolean visible, word windowStyle */ ) inline(0x0031,_CallBackVector);
  131. extern pascal void            CloseXWindow( /* WindowPtr window */ ) inline(0x0033,_CallBackVector);
  132.  
  133.  
  134. /****  XWindoid Utilities  ****/
  135. extern pascal Longint        GetXWindowValue( /* WindowPtr window */ ) inline(0x0037,_CallBackVector);
  136. extern pascal void            HideHCPalettes( ) inline(0x0034,_CallBackVector);
  137. extern pascal void            ShowHCPalettes( ) inline(0x0035,_CallBackVector);
  138. extern pascal void            SetXWIdleTime( /* WindowPtr window, Longint interval */ ) inline(0x0032,_CallBackVector);
  139. extern pascal void            SetXWindowValue( /* WindowPtr window, Longint customValue */ ) inline(0x0036,_CallBackVector);
  140. extern pascal void             XWAllowReEntrancy( /*WindowPtr window, Boolean allowSysEvts, Boolean allowHCEvts */ ) inline(0x0038,_CallBackVector);
  141.  
  142.  
  143. #endif
  144.